package model

import "gorm.io/gorm"

type Order struct {
	gorm.Model
	OrderSn           string  `json:"order_sn" gorm:"type:varchar(255);not null;comment:订单号"`
	Uid               int     `json:"uid" gorm:"type:int(11);not null;comment:用户Id"`
	TakeoutId         int     `json:"takeout_id" gorm:"type:int(11);not null;comment:餐品Id"`
	MealProductsName  string  `json:"meal_products_name;" gorm:"type:varchar(50);not null;comment:餐品名称"`
	MealProductsImage string  `json:"meal_products_image;" gorm:"type:varchar(50);not null;comment:餐品图片"`
	MealProductsPrice float64 `json:"meal_products_price;" gorm:"type:decimal(10,2);not null;comment:餐品价格"`
	PayPrice          float64 `json:"pay_price;" gorm:"type:decimal(10,2);not null;comment:支付价格"`
	DiscountPrice     float64 `json:"discount_price;" gorm:"type:decimal(10,2);not null;comment:优惠价格"`
	Num               int     `json:"num" gorm:"type:int(11);not null;comment:数量"`
	Notes             string  `json:"notes;" gorm:"type:varchar(255);not null;comment:备注"`
	Status            int     `json:"status" gorm:"type:int(11);not null;comment:优惠卷状态：1-交易完成 2-交易成功 3-待支付 4-交易异常"`
}
